﻿<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" CodeBehind="admin_website_i_addup.aspx.cs" Inherits="PM.Web.Admin.admin_website_i_addup" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <link rel="stylesheet" type="text/css" href="css/adm.css" />
    <script src="../Scripts/artDialog.min.js" type="text/javascript"></script>
    <script charset="utf-8" src="editor/kindeditor.js"></script>
    <script src="Scripts/artclose.js" type="text/javascript"></script>
    <script>
        KE.show({
            id: 'editor_id'
        });
</script>
</head>
<body>
    <form id="form1" runat="server">
    <div><input type="hidden" id="hidflag" value="0" runat="server" /><input type="hidden" id="hidId" value="0" runat="server" />
        <p>所属社区：<asp:DropDownList ID="ddlCommunity" AutoPostBack="true" OnSelectedIndexChanged="ddlCommunity_SelectIndexChanged" DataTextField="treeName" DataValueField="self_community_code" runat="server"></asp:DropDownList>
            所属大类：<asp:DropDownList ID="ddlBigClass" AutoPostBack="true" OnSelectedIndexChanged="ddlBigClass_SelectIndexChanged" DataTextField="name" DataValueField="bigclassid" runat="server"></asp:DropDownList>
            所属小类：<asp:DropDownList ID="ddlSmallClass" DataTextField="name" DataValueField="smallclassid" runat="server"></asp:DropDownList>
        </p>
        <p>标　　题：<asp:TextBox ID="txtTitle" runat="server" Width="600px"></asp:TextBox></p>
        <p>内　　容：<textarea id="editor_id" name="content" cols="100" rows="8" style="width:700px;height:300px;" runat="server"></textarea></p>
        <p>是否让用户参与报名：<asp:RadioButton ID="radCanSignY" Text="是" GroupName="CanSign" runat="server" /><asp:RadioButton ID="radCanSignN" Text="否" Checked="true" GroupName="CanSign" runat="server" />
        </p>
        <fieldset>
        <legend>添加细项</legend>
        <p>
            内容：<asp:TextBox ID="txtSubTitle" Width="600px" runat="server"></asp:TextBox>
            <asp:Button ID="btnSubSave" Text="添加" runat="server" 
                onclick="btnSubSave_Click" />
            <asp:DataGrid BorderStyle=Ridge ID="dgdSubItem" AutoGenerateColumns="False" 
                DataKeyField="subitemid" Width="677px" runat="server" BackColor="White" 
                BorderColor="White" BorderWidth="2px" CellPadding="3" CellSpacing="1" 
                GridLines="None" onitemcommand="dgdSubItem_ItemCommand">
                <Columns>
                    <asp:TemplateColumn HeaderText="细项内容">
                        <ItemTemplate>
                            <%# Eval("Title") %>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:TextBox ID="txtEditSubTitle" Text='<%# Eval("Title") %>' runat="server" Width="600px"></asp:TextBox>
                        </EditItemTemplate>

                    <ItemStyle Width="600px"></ItemStyle>
                    </asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="操作">
                        <ItemTemplate>
                            <asp:LinkButton ID="lnkEdit" ToolTip="修改" Text='<img alt="修改" style="vertical-align:middle;border:0" src="images/edt.gif" width="16" height="16" />' runat="server" CommandName="Edit"></asp:LinkButton>&nbsp;&nbsp;
                            <asp:LinkButton ID="lnkDel" ToolTip="删除" OnClientClick="return confirm(确实要删除吗？)" CausesValidation="False" Text='<img alt="删除" style="vertical-align:middle;border:0" src="images/del.gif" width="16" height="16" />' runat="server" CommandName="Delete"></asp:LinkButton>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:LinkButton ID="lnkUpdate" ToolTip="保存" Text='<img alt="保存" style="vertical-align:middle;border:0" src="images/save.gif" width="16" height="16" />' runat="server" CommandName="Update"></asp:LinkButton>&nbsp;&nbsp;
                            <asp:LinkButton ID="lnkCancel" ToolTip="取消" Text='<img alt="取消" style="vertical-align:middle;border:0" src="images/cancel.gif" width="16" height="16" />' runat="server" CommandName="Cancel"></asp:LinkButton>
                        </EditItemTemplate>
                    </asp:TemplateColumn>
                </Columns>
                <FooterStyle BackColor="#C6C3C6" ForeColor="Black" />
                <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" />
                <ItemStyle BackColor="#DEDFDE" ForeColor="Black" />
                <PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" />
                <SelectedItemStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" />
            </asp:DataGrid>
        </p>
        </fieldset>
        
        <p style="text-align:center">
                <asp:Button ID="cmdOk" runat="server" Text="保存退出" onclick="cmdOk_Click" />&nbsp;&nbsp;<input type="button" id="btnClose" value="关闭" onclick="art.dialog.close();" />
        </p>
    </div>
    </form>
</body>
</html>
